<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=cp1250">
		<title>System Ankietowy</title>
		<link href="includes/polls.css" rel="stylesheet" type="text/css">
	</head>
	<body>
		<table width="85%" border="1" align="center" cellpadding="0" cellspacing="0">
			<tr>
				<td>
					<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
				        <tr bgcolor="#C2DCEB" valign="middle">
							<td width="90%" height="60" valign="middle" bgcolor="#C2DCEB">
							<h1>Lista ankiet</h1>
							</td>
					        <td align="right" nowrap="nowrap"><a href="signout.htm">Wyloguj sie</a></td>
						</tr>
						<tr>
							<td colspan="2">
								<p align="center"><!-- status messages --> 
									<c:if test="${not empty message}">
										<font color="green">
											<c:out value="${message}" />
										</font>
										<c:set var="message" value="" scope="session" />
									</c:if>
								</p>
								<table border="1" align="center" cellpadding="8" cellspacing="0">
									<tr>
										<td>Prowadzący</td>
										<td>Przedmiot</td>
										<td>Semestr</td>
									</tr>
									<c:forEach items="${polls}" var="poll">
									<tr>
										<td align="center">
											<a href='fillpoll.htm?pid=<c:out value="${poll.pollId}"/>'>
												<c:out value="${poll.owner.firstname} " />
												<c:out value="${poll.owner.lastname} " />
											</a>
										</td>
										<td align="center">
											<c:out value="${poll.activity.name}" />
										</td>
										<td align="center">
											<c:out value="${poll.activity.semester.name}" />
								
										</td>
									</tr>
									</c:forEach>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</body>
</html>